<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>新增期间核查记录</title>                                                                                                         </title>
    <link rel="stylesheet" href="/lib/layui/layui/css/layui.css?20190817.1">
    <link rel="stylesheet" href="/lib/layui/layui/css/common.css">
    <script src="/lib/layui/layui/layui.js"></script>
    <script type="text/javascript" src="/lib/layui/layui/global.js"></script>
    <script type="text/javascript" src="../../js/jquery/jquery-1.9.1.js"></script>
    <script src="../../js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/layui/layui/js/baseCode/base.js?v=2019072018:09" type="text/javascript" charset="utf-8"></script>
    <script src="/js/jquery/jquery.cookie.js"></script>
    <script src="/lib/layui/layui/js/common.js?v=20190723" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="mbox">
    <div class="layui-card">
        <div class="layui-card-body" style="padding-left: 6px;">
            <table class="layui-hide" id="incident" lay-filter="incident"></table>
            <div style="display: flex">
                <div class="left" style="width: 50%">
                    <span>事件结果</span>
                    <table class="layui-table">
                        <colgroup>
                            <col width="100">
                            <col >
                        </colgroup>
                        <tr>
                            <td style="background-color:#eeeeee">事件结果</td>
                            <td></td>
                        </tr>
                        <tr>
                            <td style="background-color:#eeeeee;height: 100px">事件描述</td>
                            <td></td>
                        </tr>
                    </table>
                </div>
                <div class="right" style="width: 50%">
                    <span>
                        校准后能力值（能力项和出厂能力值从设备能力表读取，编辑检测能力值）
                    </span>
                    <table class="layui-hide" id="inadd" lay-filter="inadd"></table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<%--头部工具栏--%>
<script type="text/html" id="toolbarDemo">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="getCheckData">编辑</button>

    </div>
</script>

<script type="text/html" id="barDemo">
    <div class="demoTable indexOne" style="float: right; margin-right:9px;margin-top: -1px;">
        <label  class="layui-form-label" style="width: 86px">查询字段</label>
        <div class="layui-input-inline" style="height: 27px;margin-top: -11px;" >
            <select class="layui-select indexSeleOne"  lay-filter="cloum" name="cloum" id="cloum" autocomplete="off">
                <option value="">请选择</option>
                <option value="REPALOG_ID">记录编号</option>
                <option value="EQUIP_NAME">设备名称</option>
                <option value="PROPERTY_NO">固定资产编号</option>
                <option value="EQUIP_TYPE_NAME">设备类型</option>
                <option value="SPEC">规格</option>
                <option value="MODEL_NO">型号</option>
                <option value="FACTORY_NO">出厂编号</option>
                <option value="FAULT_TYPE">现象分类</option>
                <option value="FAULT_POSITION">发生部位</option>
                <option value="FAULTDESC">故障描述</option>
                <option value="APPLICANT">报修人</option>
                <option value="APPLICATION_TIME">保修时间</option>
                <option value="WORTKFLOW_NO">流水号</option>
            </select>
        </div>
        <div class="layui-inline">
            <input class="layui-input" name="indexOne"autocomplete="off" style="height: 38px">
        </div>
        <button class="layui-btn search" data-type="reload" style="height:30px;line-height: 30px">搜索</button>
    </div>
    <%--校正标准--%>
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" lay-event="carried">全选</button>
    </div>
</script>

<script>
    layui.use('table', function() {
        var table = layui.table;
        //主标格
        var tableObj=table.render({
            elem: '#incident'
            ,data:[],
            url : '/equipmentType/showParentEquipmentType'
            ,page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
                layout: ['prev', 'page', 'next',  'skip','count','limit',]//自定义分页布局
                ,limits:[5,10,15,20,25,30,35,40,45,50]
                ,first: false //不显示首页
                ,last: false //不显示尾页
            } //开启分页
            ,toolbar: '#barDemo'
            ,cols: [[ //表头
                {type: 'checkbox' }
                ,{field: 'equipNo', title: '记录编号'}
                ,{field: 'equipName', title: '设备编码', sort: true}
                ,{field: 'equipStatuasId', title: '设备名称 '}
                ,{field:'equipStatusCode',title: '资产状态 '}
                ,{field: 'modelNo', title: '维护频率'}
                ,{field: 'spec', title: '提交提醒天数'}
                ,{field: 'manufacturer', title: '事件日期'}
                ,{field: 'supplier', title: '事件操作人'}
                ,{field: 'propertyId', title: '下次到期日期'}
                ,{field: 'factoryNo', title: '流水号'}
                ,{field: 'factoryNo', title: '添加人'}
                ,{field: 'factoryNo', title: '添加日期'}
                ,{width:180,title: '操作',align:'center', toolbar: toolbarDemo}
            ]]
            ,page: true
            ,done:function(res){
                if(res.msg=="查询无数据"){
                    $('.layui-table-page').hide()
                }
                form.render();
            }
        });

        var tableObj=table.render({
            elem: '#inadd'
            ,data:[],
            url : '/equipmentType/showParentEquipmentType'
            ,page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
                layout: ['prev', 'page', 'next',  'skip','count','limit',]//自定义分页布局
                ,limits:[5,10,15,20,25,30,35,40,45,50]
                ,first: false //不显示首页
                ,last: false //不显示尾页
            } //开启分页
            ,toolbar: '#barDemo'
            ,cols: [[ //表头
                {type: 'checkbox' }
                ,{field: 'equipNo', title: '能力项'}
                ,{field: 'equipName', title: '出厂能力值'}
                ,{field: 'equipStatuasId', title: '检测能力值（用于检定校准后能力值发生变化的情况） '}
            ]]
            ,page: true
            ,done:function(res){
                if(res.msg=="查询无数据"){
                    $('.layui-table-page').hide()
                }
                form.render();
            }
        });
    })
</script>